/*
 * @Descripttion:
 * @version:
 * @Author: 穆宏宇
 * @Date: 2020-08-24 14:18:18
 * @LastEditors: 穆宏宇
 * @LastEditTime: 2020-10-16 11:16:47
 */
// 导入基础路由
import { baseRouter, commonRouter } from './router.base'
// import { importAll } from '@/util/common'

// 分别引入三种路由
import adminRouter from './modules/admin.router'
import activeRouter from './modules/active.router'
import supplierRouter from './modules/supplier.router'
import priceRouter from './modules/price.router'
import workOrderRouter from './modules/workOrder.router'
import zichanRouter from './modules/zichan.router'

// 动态引入路由文件
// const routerList = importAll(require.context('./modules', true, /\.router\.js/))
// 合并路由
commonRouter.children = commonRouter.children.concat(activeRouter)
commonRouter.children = commonRouter.children.concat(adminRouter)
commonRouter.children = commonRouter.children.concat(supplierRouter)
commonRouter.children = commonRouter.children.concat(priceRouter)
commonRouter.children = commonRouter.children.concat(workOrderRouter)
commonRouter.children = commonRouter.children.concat(zichanRouter)

const routes = [
  commonRouter,
  ...baseRouter
]

export default routes
